﻿using System.Configuration;

namespace Tilver.Configuration.Logging
{
    /// <summary>
    /// 日志以文件方式输出配置类
    /// </summary>
    public class FileAppenderElement : ConfigurationElement
    {
        /// <summary>
        /// 配置节名称
        /// </summary>
        [ConfigurationProperty("name", IsRequired = true, IsKey = true)]
        public string Name
        {
            get { return (string)this["name"]; }
            set { this["name"] = value; }
        }
        /// <summary>
        /// 文件名
        /// </summary>
        [ConfigurationProperty("filename", IsRequired = true)]
        public string FileName
        {
            get { return (string)this["filename"]; }
            set { this["filename"] = value; }
        }
        /// <summary>
        /// 是否追加
        /// </summary>
        [ConfigurationProperty("append")]
        public bool Append
        {
            get { return (bool)this["append"]; }
            set { this["append"] = value; }
        }
        /// <summary>
        /// 格式化字符串
        /// </summary>
        [ConfigurationProperty("formatter")]
        public string Formatter
        {
            get { return (string)this["formatter"]; }
            set { this["formatter"] = value; }
        }
    }
}
